home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swaga_c.zip / CHARS.SWG / 0004_Read Screen CHARS.pas < prev    next >
Pascal/Delphi Source File  |  1993-05-28  |  422b  |  22 lines

  1. {
  2. Author: A A Olowofoyeku
  3.  
  4. As For reading the ASCII stuff from the screen, I have a routine that
  5. allows you to read a Character from any location on the screen.
  6. }
  7.  
  8. Uses
  9.   Dos;
  10.  
  11. {-- read the Character at the cursor and return it as a Char --}
  12. Function ScreenChar : Char;
  13. Var
  14.   R : Registers;
  15. begin
  16.   FillChar(R, SizeOf(R), 0);
  17.   R.AH := 8;
  18.   R.BH := 0;
  19.   Intr($10, R);
  20.   ScreenChar := Chr(R.AL);
  21. end;
  22.